import QtQuick 1.0
import Qt 4.7
import QtMultimediaKit 1.1

Item{
    id: pauseview
    objectName: "pauseview"

    Image {
        id: background
        source: "images/bg/bg_pause.png"
        x:0
        y:0
    }
    PlayMusic{
        id : bgSound
    }

    Button {
        id: resumeButton
        imagesource: "images/bu/bu_resume.png"
        width: 146
        height: 56
        x: 115
        y: 200
        onClicked: {
            console.log("resume")
            gameWindow.resumeGame(true)
        }
    }
    Button {
        id: retryButton
        imagesource: "images/bu/bu_retry.png"
        width: 146
        height: 56
        x: 115
        y: 270
        onClicked: {
            console.log("ulang")
            mainWidget.setScreen(4)
        }
    }
    Button {
        id: menuButton
        imagesource: "images/bu/bu_menu.png"
        width: 146
        height: 56
        x: 115
        y: 340
        onClicked: {
            console.log("menu")
            mainWidget.setScreen(1)
        }
    }
    Button {
        id: musicButton
        imagesource: "images/bu/bu_music.png"
        width: 67
        height: 52
        x: 115
        y: 410
        onClicked: {
            console.log("music")
            if (bgSound.playing)
            {
                mainWidget.setMusicMute(true);
                bgSound.stop()
            }
            else
            {
                mainWidget.setMusicMute(false);
                bgSound.play()
            }
        }
    }
    Button {
        id: soundButton
        imagesource: "images/bu/bu_sound.png"
        width: 67
        height: 52
        x: 197
        y: 410
        onClicked: {
            if(mainWidget.getSoundMute()){
                mainWidget.setSoundMute(false)
            } else {
                mainWidget.setSoundMute(true)
            }
        }
    }
}
